<%@ page language="java" contentType="text/html;charset=UTF-8"%>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
	<title>后台登录  v2.3</title>
	<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
</head>
<script type="text/javascript">
function submitForm(){
	fm1.submit();
}

var captcha;
function refreshCaptcha(){  
	document.getElementById("img_captcha").src="${ctx}/code/code?d=" + Math.random();
}  

</script>
<body>
<div style="margin: 40px 10px 10px 10px">
<form role="form" id="fm1" name="fm1" action="/index/login"  method="post" style="margin:auto;width:400px;height:300px;">
  <div class="form-group">
    <label for="exampleInputEmail1">用户名：</label>
    <input type="text" class="form-control" id="username" name="username" placeholder="请输入您的用户名字">
  </div>
  <div class="form-group">
    <label for="exampleInputPassword1">密码</label>
    <input type="password" class="form-control" id="password" name="password" placeholder="请输入您的密码">
  </div>
  <div class="checkbox">
    <label>
      <input type="checkbox"> 记住密码
    </label>
  </div>
   <div class="row cl" style="margin:auto;">
        <div class="formControls col-8 col-offset-3">
          <input class="input-text size-L" name="code" type="text" placeholder="验证码" onblur="if(this.value==''){this.value='验证码:'}" onclick="if(this.value=='验证码:'){this.value='';}" value="验证码:" style="width:200px;">
          <img alt="验证码" title="点击更换" id="img_captcha" height="30px;" width="90px;" onclick="this.src='${ctx}/code/code?d='+Math.random();" src="${ctx}/code/code"/> <a id="kanbuq" onclick="javascript:refreshCaptcha();" href="javascript:;">看不清，换一张</a> </div>
      </div>
   <div style="text-align: center; margin-top: 10px;">
      	 	<c:if test="${msg != null }">
      	 	<p style="color: red">${msg}</p>
      	 </c:if>
      </div>
  <input type="hidden" name="bas" id="bas" value="<%=request.getContextPath()%>" /></td>
  <button type="button" class="btn btn-primary" onclick="submitForm()">登陆</button>
  <button type="reset" class="btn btn-primary">充值</button>
   
</form>	
</div>
</body>
</html>